    <script>
    function select(sid)
	{
		$(".fad-"+sid).siblings('div[class^="fad-"]').hide(function(){
			$(".fad-"+sid).show();
			
		});
		
		if(sid==='2')
		{
			$.post("{:url('administration/index/ewm')}",function(msg){
    			if(msg['result']){
    				$('#ewm').attr('src',"{:url('administration/index/ewmimg')}");
    				
    				var intervalProcess = setInterval( yzewm , 3000 );
    				
    				function yzewm()
    				{
    					$.post("{:url('administration/index/ewmyanzheng')}",function(msg){
    						if(msg['result'])
    							{
    							clearInterval(intervalProcess);
    							loginsucess();
    							}
    					});
    				}
    			}    			
    			}); 
		}
	
	}
    $(document).ready(function(){
    	$('.theme').click(function(){ 		    	
    		$.post("{:url('administration/index/theme')}",{tid:$(this).attr('data')},function(msg){
    			if(msg['result']){
    				window.location="{:url('/administration')}"+'?'+Math.ceil(Math.random()*10000);    				
    			}    			
    			}); 
    	});
    	$('.login-adv').click(function(){
    		$.post("{:url('administration/index/login')}",{uid:$('#login-name-ad').val()},function(msg){
    			if(msg['result']){
    				loginsucess();
    				
    			}
    			
    			});
    	});   	
    	
    });
    
    function loginsucess()
    {
    	var dialog = bootbox.dialog({
		    title: '提示',
		    size:'small',
		    closeButton:false,
		    message: '<p><i class="fa fa-spin fa-thumbs-up"></i> 登陆成功.</p>'
		});
		dialog.init(function(){
		    setTimeout(function(){	    		        
		    	
		    	dialog.modal('hide');
		    	window.location="{:url('/administration/main')}";
	    		//window.location="{:url('/administration')}"+'?'+Math.ceil(Math.random()*10000);
		    }, 3000);
		});
    }
   
    </script>